import { BasicColumn, FormSchema } from '@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '按钮名称',
    dataIndex: 'name',
    // width: 160,
  },
  {
    title: '按钮代码',
    dataIndex: 'code',
    // width: 200,
  },
  {
    title: '创建时间',
    dataIndex: 'created_at',
    // width: 180,
  },
  {
    title: '描述',
    dataIndex: 'description',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    // label: '按钮名称',
    component: 'Input',
    componentProps: {
      placeholder: '按钮名称/代码',
    },
    colProps: { span: 8 },
  },
  // {
  //   field: 'code',
  //   label: '按钮代码',
  //   component: 'Input',
  //   colProps: { span: 8 },
  // },
];

export const formSchema: FormSchema[] = [
  {
    field: 'name',
    label: '按钮名称',
    component: 'Input',
    required: true,
  },
  {
    field: 'code',
    label: '按钮代码',
    component: 'Input',
    required: true,
  },
  {
    label: '按钮描述',
    field: 'description',
    component: 'InputTextArea',
  },
];
